attribute float aSize;
varying float vSize;

uniform float uTime;
uniform vec3 uColor;

uniform float uLength;

void main() {
  vec4 viewPositon = viewMatrix * modelMatrix * vec4(position, 1);
  gl_Position = projectionMatrix * viewPositon;

  vSize = (aSize-uTime);
  if(vSize<0.0){
    vSize = vSize + uLength;
  }
  vSize = (vSize-800.0)*0.1;

  gl_PointSize = -vSize/viewPositon.z;
}